package com.xiangyang.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class CaseHistory  extends BaseEntity{
    private Long caseHistoryId;//病历id
    private Long patientId;//患者id
    private Long registrationId;//挂号id
    private Long doctorId;//医生id
    private String symptom;//症状
    private String diagnosis;//诊断
    private Long prescriptionId;//处方id
    private String createdAt;//创建时间
    // 重写 BaseEntity 的 getId 和 setId 方法
    @Override
    public Long getId() {
        return getCaseHistoryId();
    }

    @Override
    public void setId(Long caseHistoryId) {
        setCaseHistoryId(caseHistoryId);
    }



    public void setPostId(Long caseHistoryId) {
        this.caseHistoryId = caseHistoryId;
        // 同步设置 BaseEntity 的 id
        super.setId(caseHistoryId);
    }
}
